home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Tools - Objects / MPW C++ / MPW C++ 3.1 / Interfaces / CIncludes / stdiostream.h < prev    next >
Text File  |  1990-09-11  |  1KB  |  48 lines

  1. /*ident    "@(#)ctrans:incl/stdiostream.h    1.1.2.1" */
  2. /**************************************************************************
  3.                         Copyright (c) 1984 AT&T
  4.                           All Rights Reserved   
  5.  
  6.         THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
  7.       
  8.         The copyright notice above does not evidence any        
  9.         actual or intended publication of such source code.
  10.  
  11. *****************************************************************************/
  12. #ifndef __STDSTREAM__
  13. #define __STDSTREAM__
  14.  
  15. #include <iostream.h>
  16. #include <stdio.h>
  17.  
  18. class stdiobuf : public streambuf {
  19.     /*** stdiobuf is obsolete, should be avoided ***/
  20. public: // Virtuals
  21.     virtual int    overflow(int=EOF);
  22.     virtual int    underflow();
  23.     virtual int    sync() ;
  24.     virtual streampos
  25.             seekoff(streamoff,seek_dir,int) ;
  26.     virtual int    pbackfail(int c);
  27. public:
  28.             stdiobuf(FILE* f) ;
  29.     FILE*        stdiofile() { return fp ; }
  30.     virtual        ~stdiobuf() ;
  31. private:
  32.     FILE*        fp ;            
  33.     int        last_op ;
  34.     char        buf[2];
  35. };
  36.  
  37. class stdiostream : public ios {
  38. public:
  39.             stdiostream(FILE*) ;
  40.             ~stdiostream() ;
  41.     stdiobuf*    rdbuf() ;
  42. private:
  43.     stdiobuf    buf ;
  44. };
  45.  
  46. #endif
  47.  
  48.